package com.yuanhua.xcxmng.wechat.service;

import java.util.Date;
import java.util.List;

import com.yuanhua.xcxmng.wechat.entity.HistoryTable;
import com.yuanhua.xcxmng.wechat.entity.User;
import com.yuanhua.xcxmng.wechat.entity.UserIndicator;

/**
 * The interface Indicator service.
 *
 * @author hzy24985
 * @version $Id : IndicatorServiceImpl, v 0.1 2018/8/5 下午11:21 hzy24985 Exp $
 */
public interface IndicatorService {

    /**
     * Save.
     *
     * @param indicator the indicator
     * @param user      the user
     * @return the int
     */
    int save(UserIndicator indicator, User user);


    /**
     * Gets latest record.
     *
     * @param openId       the open id
     * @param startOfMonth the start of month
     * @param endOfMonth   the end of month
     * @param n            the n
     * @return the lastest record
     */
    List<UserIndicator> getLatestRecord(String openId, Date startOfMonth, Date endOfMonth, int n);

    /**
     * Gets indicator report.
     *
     * @param openId       the open id
     * @param startOfMonth the start of month
     * @param endOfMonth   the end of month
     * @return the indicator report
     */
    List<UserIndicator> getIndicatorReport(String openId, Date startOfMonth, Date endOfMonth);

    List<HistoryTable> getHistoryTableData(String openId, int index, List<Date> dateRange);

}
